3.104 \(\int \frac{x (A+B x^2)}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=71 \[ \frac{(b B-2 A c) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{B \log \left (a+b x^2+c x^4\right )}{4 c} \]

[Out]

((b*B - 2*A*c)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c*Sqrt[b^2 - 4*a*c]) + (B*Log[a + b*x^2 + c*x^4])/
(4*c)

________________________________________________________________________________________

Rubi [A]  time = 0.0702653, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {1247, 634, 618, 206, 628} \[ \frac{(b B-2 A c) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{B \log \left (a+b x^2+c x^4\right )}{4 c} \]

Antiderivative was successfully verified.

[In]

Int[(x*(A + B*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

((b*B - 2*A*c)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c*Sqrt[b^2 - 4*a*c]) + (B*Log[a + b*x^2 + c*x^4])/
(4*c)

Rule 1247

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[
Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{x \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{A+B x}{a+b x+c x^2} \, dx,x,x^2\right )\\ &=\frac{B \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c}+\frac{(-b B+2 A c) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c}\\ &=\frac{B \log \left (a+b x^2+c x^4\right )}{4 c}-\frac{(-b B+2 A c) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c}\\ &=\frac{(b B-2 A c) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{B \log \left (a+b x^2+c x^4\right )}{4 c}\\ \end{align*}

Mathematica [A]  time = 0.0517813, size = 71, normalized size = 1. \[ \frac{B \log \left (a+b x^2+c x^4\right )-\frac{2 (b B-2 A c) \tan ^{-1}\left (\frac{b+2 c x^2}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}}{4 c} \]

Antiderivative was successfully verified.

[In]

Integrate[(x*(A + B*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

((-2*(b*B - 2*A*c)*ArcTan[(b + 2*c*x^2)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + B*Log[a + b*x^2 + c*x^4])/(4
*c)

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 98, normalized size = 1.4 \begin{align*}{\frac{B\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) }{4\,c}}+{A\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bB}{2\,c}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(B*x^2+A)/(c*x^4+b*x^2+a),x)

[Out]

1/4*B*ln(c*x^4+b*x^2+a)/c+1/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*A-1/2/(4*a*c-b^2)^(1/2)*ar
ctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*B*b/c

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x^2+A)/(c*x^4+b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.53889, size = 487, normalized size = 6.86 \begin{align*} \left [-\frac{{\left (B b - 2 \, A c\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c -{\left (2 \, c x^{2} + b\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) -{\left (B b^{2} - 4 \, B a c\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (b^{2} c - 4 \, a c^{2}\right )}}, \frac{2 \,{\left (B b - 2 \, A c\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{{\left (2 \, c x^{2} + b\right )} \sqrt{-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) +{\left (B b^{2} - 4 \, B a c\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (b^{2} c - 4 \, a c^{2}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x^2+A)/(c*x^4+b*x^2+a),x, algorithm="fricas")

[Out]

[-1/4*((B*b - 2*A*c)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^4 + 2*b*c*x^2 + b^2 - 2*a*c - (2*c*x^2 + b)*sqrt(b^2 - 4*a
*c))/(c*x^4 + b*x^2 + a)) - (B*b^2 - 4*B*a*c)*log(c*x^4 + b*x^2 + a))/(b^2*c - 4*a*c^2), 1/4*(2*(B*b - 2*A*c)*
sqrt(-b^2 + 4*a*c)*arctan(-(2*c*x^2 + b)*sqrt(-b^2 + 4*a*c)/(b^2 - 4*a*c)) + (B*b^2 - 4*B*a*c)*log(c*x^4 + b*x
^2 + a))/(b^2*c - 4*a*c^2)]

________________________________________________________________________________________

Sympy [B]  time = 2.51237, size = 287, normalized size = 4.04 \begin{align*} \left (\frac{B}{4 c} - \frac{\left (- 2 A c + B b\right ) \sqrt{- 4 a c + b^{2}}}{4 c \left (4 a c - b^{2}\right )}\right ) \log{\left (x^{2} + \frac{- A b + 2 B a - 8 a c \left (\frac{B}{4 c} - \frac{\left (- 2 A c + B b\right ) \sqrt{- 4 a c + b^{2}}}{4 c \left (4 a c - b^{2}\right )}\right ) + 2 b^{2} \left (\frac{B}{4 c} - \frac{\left (- 2 A c + B b\right ) \sqrt{- 4 a c + b^{2}}}{4 c \left (4 a c - b^{2}\right )}\right )}{- 2 A c + B b} \right )} + \left (\frac{B}{4 c} + \frac{\left (- 2 A c + B b\right ) \sqrt{- 4 a c + b^{2}}}{4 c \left (4 a c - b^{2}\right )}\right ) \log{\left (x^{2} + \frac{- A b + 2 B a - 8 a c \left (\frac{B}{4 c} + \frac{\left (- 2 A c + B b\right ) \sqrt{- 4 a c + b^{2}}}{4 c \left (4 a c - b^{2}\right )}\right ) + 2 b^{2} \left (\frac{B}{4 c} + \frac{\left (- 2 A c + B b\right ) \sqrt{- 4 a c + b^{2}}}{4 c \left (4 a c - b^{2}\right )}\right )}{- 2 A c + B b} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x**2+A)/(c*x**4+b*x**2+a),x)

[Out]

(B/(4*c) - (-2*A*c + B*b)*sqrt(-4*a*c + b**2)/(4*c*(4*a*c - b**2)))*log(x**2 + (-A*b + 2*B*a - 8*a*c*(B/(4*c)
- (-2*A*c + B*b)*sqrt(-4*a*c + b**2)/(4*c*(4*a*c - b**2))) + 2*b**2*(B/(4*c) - (-2*A*c + B*b)*sqrt(-4*a*c + b*
*2)/(4*c*(4*a*c - b**2))))/(-2*A*c + B*b)) + (B/(4*c) + (-2*A*c + B*b)*sqrt(-4*a*c + b**2)/(4*c*(4*a*c - b**2)
))*log(x**2 + (-A*b + 2*B*a - 8*a*c*(B/(4*c) + (-2*A*c + B*b)*sqrt(-4*a*c + b**2)/(4*c*(4*a*c - b**2))) + 2*b*
*2*(B/(4*c) + (-2*A*c + B*b)*sqrt(-4*a*c + b**2)/(4*c*(4*a*c - b**2))))/(-2*A*c + B*b))

________________________________________________________________________________________

Giac [A]  time = 1.18495, size = 90, normalized size = 1.27 \begin{align*} \frac{B \log \left (c x^{4} + b x^{2} + a\right )}{4 \, c} - \frac{{\left (B b - 2 \, A c\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x^2+A)/(c*x^4+b*x^2+a),x, algorithm="giac")

[Out]

1/4*B*log(c*x^4 + b*x^2 + a)/c - 1/2*(B*b - 2*A*c)*arctan((2*c*x^2 + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c
)*c)